import React, { Component } from 'react';
import './search.scss'
class search extends Component {
  state = {
    seekVal:''
  }
  textChange=(e)=>{
    this.setState({
      seekVal:e.target.value
    })
  }
  confirm=()=>{
    this.props.seek(this.state.seekVal)
  }
  render () {
    return (
      <>
        <div className='searchBox'>
            <input type="text" className="left" value={this.seekVal} onChange={this.textChange}/>
          <div className="one" onClick={this.confirm}>百度一下</div>
        </div>
      </>
    )
  }
}

export default search;